﻿using Abp.Runtime.Validation;
using Camc.Quality.Dto;
using System;

namespace Camc.Quality.Materials.Dto
{
    /// <summary>
    /// 物料建模详细内容分页过滤
    /// </summary>
   public class GetMaterialsContentListInput : PagedAndSortedInputDto, IShouldNormalize
    {
        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }
        /// <summary>
        /// 物料类别
        /// </summary>
        public Guid MaterialTypeId { get; set; }
        /// <summary>
        /// 物料类别名称
        /// </summary>
        public string MaterialTypeName { get; set; }
        /// <summary>
        /// 物料细分类别id
        /// </summary>
        public Guid MaterialCategoryId { get; set; }

        /// <summary>
        /// 物料类型名称
        /// </summary>
        public string MaterialTypeCode { get; set; }
        /// <summary>
        /// 物料图号
        /// </summary>
        public string MaterialNo { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        public string Model { get; set; }
        public string Filter { get; set; }
        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "CreationTime Desc";
            }
        }
    }
}
